import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mall_app/pages/widget/LocalNavWebWidget.dart';
import 'package:splashscreen/splashscreen.dart';

// ignore: camel_case_types
class Splash_Page extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<Splash_Page> {
  //初始颜色配置方案
  static const Color Uniform_color_configuration = Color(0XF0FFFF);

  @override
  Widget build(BuildContext context) {
    return SplashScreen(
      //彩蛋和启动页时间限制为30秒
      seconds: 30,
      //todo 预设测试页面
      navigateAfterSeconds: "/home",
      title: Text(
        'Mall for Greece',
        style: TextStyle(fontWeight: FontWeight.bold, fontSize: 40.0),
      ),
      backgroundColor: Uniform_color_configuration,
      //styleTextUnderTheLoader: TextStyle(),
      photoSize: 100.0,
      onClick: () => Navigator.of(context)
          .push(new MaterialPageRoute(builder: (BuildContext context) {
        return LocalNavWebWidget(
            "https://gitee.com/MarkburtOS/mall_app",
            "神秘小彩蛋");
      })),

      //加载动画颜色
      loaderColor: Uniform_color_configuration,
      loadingText: Text('www.alsyun.com'),
    );
  }
}

// ignore: must_be_immutable
